package com.xt.dao;

import com.xt.bean.Class;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;

/**
 * Created by XT on 2018/5/3.
 */
public interface ClassRepository extends MongoRepository<Class, String> {

    Page<Class> findByDepartmentId(String departmentId, Pageable pageable);

    Page<Class> findByNameLike(String name, Pageable pageable);

    Page<Class> findByDepartmentIdAndNameLike(String departmentId, String name, Pageable pageable);

    Page<Class> findByDepartmentIdAndSpecialtyId(String departmentId, String specialtyId, Pageable pageable);

    Page<Class> findByDepartmentIdAndSpecialtyIdAndNameLike(String departmentId, String specialtyId, String name, Pageable pageable);

    Page<Class> findByDepartmentIdLikeAndSpecialtyIdLikeAndNameLikeAndYearLike(String departmentId, String specialtyId, String name,String year, Pageable pageable);



}
